headerbar: do not show buttons for modals/transients
authorOlivier Fourdan <ofourdan@redhat.com>
Tue, 31 May 2016 13:25:52 +0000 (15:25 +0200)
committerOlivier Fourdan <ofourdan@redhat.com>
Wed, 1 Jun 2016 07:47:23 +0000 (09:47 +0200)
commit7c397c621cb6ba7ba3575083b1510f226e7e25f4
tree980437d2f9dd3eb8463b7d9c3b94f376faea0fda
parent11e22aadda28160d8c62438c7af3cec0d8b054d5
headerbar: do not show buttons for modals/transients

GtkHeadeBar checks the window type hint to determine if the regular
buttons such as menu, maximize or iconify should be visible in the
header bar.

However, an application may very well use a "normal" toplevel window and
set it transient and modal afterwards. In such a case, the iconify
button would remain visible, and the user can hide the window, but being
a modal, the parent window would remain insensitive.

Check for the window type, modality and transient relationship to decide
whether or not the regular toplevel buttons should be visible in the
header bar.

https://bugzilla.gnome.org/show_bug.cgi?id=767052
gtk/gtkheaderbar.c
gtk/gtkwindow.c